public interface Device {
    void powerOn();
    void powerOff();
    String getInfo();
    void repair();

    String getIpAddress();

    int getUsbVersion();
}

// 打印机类（实现多个接口）
class printer implements Device, NetworkDevice, UsbDevice {
    private String model;
    private String ip;

    public printer(String model, String ip) {
        this.model = model;
        this.ip = ip;
    }

    @Override
    public void powerOn() {
        System.out.println(model + "打印机开机");
    }

    @Override
    public void powerOff() {
        System.out.println(model + "打印机关机");
    }

    @Override
    public String getInfo() {
        return "打印机：" + model;
    }

    @Override
    public void repair() {

    }

    @Override
    public void connectNetwork() {
        System.out.println(model + "连接到校园网");
    }

    @Override
    public String getNetworkStatus() {
        return null;
    }

    @Override
    public String getIpAddress() {
        return ip;
    }

    @Override
    public void connectUsb() {
        System.out.println(model + "连接到USB接口");
    }

    @Override
    public String getUsbStatus() {
        return null;
    }

    @Override
    public int getUsbVersion() {
        return 3;
    }
}

